<template>
	<view>
		<scroll-view  :scroll-x="true">
		 
		   <view class="scroll_box">
		 
			<view class="scroll_item" v-for="(item,index) in house">
				<view class="items">
				<view class="item-face">
					<navigator :url="'/pages/show/show?id='+item.id">
					<up-image :src="item.thumb" width="140" height="110" radius="8"></up-image>
					</navigator> 
				</view>
				<view class="item-title">
					<u-text :bold="true" lines="1"
					:text="item.item_address"></u-text>
				</view>
				<view class="price">
					<text class="total">{{item.item_price}}</text>
				</view>
				</view>
			</view>
			 
		 <!-- scroll_box -->
		 </view>
		</scroll-view>
		<navigator :url="'/pages/house/house?zhutype='+zhutype+'&keyword='+village_name">
		 <view class="findmore"> {{tipstext}} </view>
		 </navigator> 
	</view>
</template>

<script>
import { number } from '../../uni_modules/uview-plus/libs/function/test';
	export default {
		name:"kb-realhouse",
		props:{
			house:{
				type: Array,
				default :undefined,
			},
			zhutype:{
				type: [String, Number],
				default:'0',
			},
			total: {
				type: [String, Number],
				default: '0',
			},
			village_name: { //通过id房源关联的小区房源
				type: [String, Number],
				default: "",
			}
		} ,
		computed:{
			tipstext(){
				return '同小区在售 '+ this.total +' 套'
			}
			
		}
	}
</script>

<style lang="scss">
	.scroll_box{
		 display: flex;
		 margin-bottom: 20px;
	}
	.items{
		display: flex;
		padding-bottom: 30px; 
		flex-direction: column;
		width: 140px ;
		.item-title{
			line-height: 30px;
		}
	}
.scroll_item{
	display: flex;
	flex-direction: column;
	height: 160px;
	justify-content: space-between;
	margin-right: 13px;
	
	.price {
		.total{
			color: #ff0000;
			font-weight: bold;
		}
	}
}
</style>